A first attempt at type class directives

نویسندگان

  • Bastiaan Heeren
  • Jurriaan Hage
چکیده

Building on earlier work on type inference directives for scripting a compiler to improve type error messages, we present extensions to those directives to deal with type classes. Our work is mainly motivated by the need for better type error messages, especially for domain specific languages. Type inference directives can bridge the gap between embedded domain specific languages and Haskell by their ability to lift error messages to the conceptual level of the domain, without a need to know anything about how the compiler works on the inside. We consider both special type class directives, which help to improve type error messages in the presence of type classes, and we show how existing type inference directives can be extended to cope with overloading. We also describe a heuristic where type class information is used to pinpoint more precisely the most likely source of a unification error in a program.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

بررسی عملکرد هیات امنای دانشگاه های علوم پزشکی دولتی ایران در پنج دوره زمانی طی سال های 1370 تا 1395

Background and purpose: Hierarchical decision-making bodies in universities include the board of trustees, the head of university, the board of directors, and the university council. The aim of this research was to determine the function of the board of trustees of state medical sciences universities in Iran during five different periods; 1991 to 2016. Materials and methods: In this descriptiv...

متن کامل

Type Class Directives

The goal of this paper is to improve the type error messages in the presence of Haskell 98 type classes, in particular for the nonexpert user. As a language feature, type classes are very pervasive, and strongly influence what is reported and when, even in relatively simple programs. We propose four type class directives, and specialized type rules, to lend high-level support to compilers to im...

متن کامل

Risks and Risk Factors of Repeated Suicidal Attempt: Study on Unconscious Poisoned Patients

Background: Most drug overdoses are due to suicidal attempts. This study was designed to analyze the risks and risk factors of poisoned patients with repeated suicidal attempt in Iran. Methods: This case-control study was conducted at Loghman Hakim Hospital, Tehran, Iran, during April to May 2008. Eighty-seven patients who were admitted due to drug overdose with loss of consciousness were enrol...

متن کامل

A Third-degree B-spline Collocation Scheme for Solving a Class of the Nonlinear Lane–-Emden Type Equations

In this paper, we use a numerical method involving collocation method with third B-splines as basis functions for solving a class of singular initial value problems (IVPs) of Lane--Emden type equation. The original differential equation is modified at the point of singularity. The modified problem is then treated by using B-spline approximation. In the case of non-linear problems, we first line...

متن کامل

2 Architecture User Interface Behavior Model Execution Directives Generation Directives Compiler Analyzers Edit / Browser Execution Trace

Test Suite Test Suite Trace The first three interfaces are for the users’ primary access to the tools. The latter three are more for internal use by the tools, but the abstract test suite may also be directly used by a user to script a particular test case. 3.1 Behavioural Modeling Language The behavioural model describes the behaviour of the system under test. It is implemented as a UML profil...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2004